﻿using System;
using System.Web.Mvc;
using FluentValidation.Attributes;
using Nop.Web.Validators.ShareBuy;
using Nop.Web.Framework;
using Nop.Web.Framework.Mvc;
using Nop.Web.Models.Catalog;
using System.Collections.Generic;
using Nop.Web.Models.Media;
using System.ComponentModel.DataAnnotations;
using Nop.Web.Models.Customer;

namespace Nop.Web.Models.ShareBuy
{
    [Validator(typeof(ShareBuyValidator))]
    public class ShareBuyModel : BaseNopEntityModel
    {
        public ShareBuyModel()
        {
            ShareBuyPictureModels = new List<ShareBuyPictureModel>();
            ShareBuyCommentModels = new List<ShareBuyCommentModel>();
            AddShareBuyCommentModel = new AddShareBuyCommentModel();
            DefaultPictureModel = new ShareBuyPictureModel();
            ProductDetailsModel = new ProductDetailsModel();
            ProductVariantSelectList = new List<SelectListItem>();
            CategorySelectList = new List<SelectListItem>();
        }

        [NopResourceDisplayName("Customer")]
        public int CustomerId { get; set; }
        public string CustomerName { get; set; }
        public string CustomerAvatarUrl { get; set; }

        public int OrderId { get; set; }

        [NopResourceDisplayName("ProductVariant")]
        public int ProductVariantId { get; set; }

        [NopResourceDisplayName("Product Name")]
        public string ProductName { get; set; }
        public int ProductId { get; set; }
        public string ProductSeName { get; set; }
        public ProductDetailsModel ProductDetailsModel { get; set; }

        [NopResourceDisplayName("Product")]
        public List<SelectListItem> ProductVariantSelectList { get; set; }

        [NopResourceDisplayName("Category")]
        public List<SelectListItem> CategorySelectList { get; set; }

        [NopResourceDisplayName("Title")]
        [AllowHtml]
        public string Title { get; set; }

        [NopResourceDisplayName("Description")]
        [AllowHtml]
        public string Description { get; set; }

        [NopResourceDisplayName("Deleted")]
        [AllowHtml]
        public bool Deleted { get; set; }

        [NopResourceDisplayName("CreatedOnUtc")]
        public DateTime CreatedOnUtc { get; set; }

        [NopResourceDisplayName("UpdatedOnUtc")]
        public DateTime UpdatedOnUtc { get; set; }

        public int Likes { get; set; }

        //pictures
        public int DefaultPictureId { get; set; }
        public ShareBuyPictureModel DefaultPictureModel { get; set; }
        public IList<ShareBuyPictureModel> ShareBuyPictureModels { get; set; }
        //comments
        public IList<ShareBuyCommentModel> ShareBuyCommentModels { get; set; }

        public AddShareBuyCommentModel AddShareBuyCommentModel { get; set; }


    }
}